<script>
import outMain from "@/components/outMain.vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { signRecordDetails } from "@/http/api";

export default {
  components: { outMain },
  name: "",
  data() {
    return {
      detailId: this.$route.query.id,
      type: this.$route.query.type,
      formData: {},
      fileImg: [],
    };
  },
  props: {},
  setup() {},
  methods: {
    backFn() {
      this.$router.back();
    },
    getData() {
      signRecordDetails({ type: this.type, id: this.detailId }).then((res) => {
        if (res.data.code == 1) {
          this.formData = res.data.data;
        }
      });
    },
  },
  mounted() {},
  created() {
    this.getData();
  },
};
</script>
<template>
  <outMain>
    <div class="formCont">
      <div class="formStep">
        <div class="formHead">
          <div>船员签约详情</div>
          <btn value="返回上一级" @ok="backFn"></btn>
        </div>
        <div class="formMain">
          <div class="stepCont">
            <div class="formDes">
              <div class="desTitle">签约信息</div>
              <div class="desCont">
                <div class="desItem">
                  <div class="desName">签约单号</div>
                  <div class="desText">{{ formData.sign_number }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">签约岗位</div>
                  <div class="desText">{{ formData.position_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">船员状态</div>
                  <div class="desText">
                    <el-tag v-if="formData.zz_status == 1">在职</el-tag>
                    <el-tag type="info" v-if="formData.zz_status == 2"
                      >在职</el-tag
                    >
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">船舶名称</div>
                  <div class="desText">{{ formData.qy_watercraft_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">船员姓名</div>
                  <div class="desText">{{ formData.real_name }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">手机号</div>
                  <div class="desText">{{ formData.mobile }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">船员薪资</div>
                  <div class="desText">
                    {{ formData.qy_cyxz }}({{
                      formData.qy_cyxz_dw == 1 ? "元" : "美元"
                    }})
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">来源端口</div>
                  <div class="desText">
                    <el-tag v-if="type == 1">企业端</el-tag>
                    <el-tag type="warning" v-if="type == 2">船东端</el-tag>
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">操作状态</div>
                  <div class="desText">
                    <el-tag v-if="formData.is_sup_bj">已标记</el-tag>
                  </div>
                </div>
                <div class="desItem">
                  <div class="desName">证书等级</div>
                  <div class="desText">{{ formData.qy_zsdj }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">签约时间</div>
                  <div class="desText">{{ formData.create_time }}</div>
                </div>
                <div class="desItem">
                  <div class="desName">离职时间</div>
                  <div class="desText">{{ formData.lz_time }}</div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </outMain>
</template>
<style scoped lang="less"></style>
